package app
{
	public class StateConstants	{
		
		public static const STATE_ASSEMBLY:String = "state/assembly";
		public static const STATE_AQUISITION:String = "state/aquisition";
		public static const STATE_PREPARATION:String = "state/preparation";
		public static const STATE_DISPLAY:String = "state/display";
		public static const STATE_IN:String = "state/in";
		public static const STATE_OUT:String = "state/out";

		public static const ACTION_ASSEMBLED:String = "action/assembled";
		public static const ACTION_AQUIRED:String = "action/aquired";
		public static const ACTION_PREPARED:String = "action/prepared";
		public static const ACTION_DISPLAY:String = "action/display";
		public static const ACTION_OPEN:String = "action/open";
		public static const ACTION_SAVE:String = "action/save";
		
		
		
		public static const CHANGED_ASSEMBLY:String = "changed/construction";
		public static const CHANGED_AQUISITION:String = "changed/aquisition";
		public static const CHANGED_PREPARATION:String = "changed/preparation";
		public static const CHANGED_DISPLAY:String = "changed/display";
		public static const CHANGED_OPEN:String = "changed/open";
		public static const CHANGED_SAVE:String = "changed/save";
		public static const CHANGED_IN:String = "changed/in";
		public static const CHANGED_OUT:String = "changed/out";
		
		public static const  FSM_DECLARATION:XML = 
            <fsm initial={STATE_ASSEMBLY}>
           
               <state 	name={STATE_ASSEMBLY} 
               			changed={CHANGED_ASSEMBLY}>
	                   	<transition action={ACTION_ASSEMBLED} 
	                   				target={STATE_AQUISITION}
	                   />
               </state>
               <state 	name={STATE_AQUISITION} 
               			changed={CHANGED_AQUISITION}>
	                   	<transition action={ACTION_AQUIRED} 
	                   				target={STATE_PREPARATION}
	                   />
               </state>
                <state 	name={STATE_PREPARATION} 
               			changed={CHANGED_PREPARATION}>
	                   	<transition action={ACTION_PREPARED} 
	                   				target={STATE_DISPLAY}
	                   />
               </state>
               <state 	name={STATE_DISPLAY}
               			changed={CHANGED_DISPLAY}>
               			<transition action={ACTION_SAVE} 
	                   				target={STATE_OUT}
	                   	/>
	                   	<transition action={ACTION_OPEN} 
	                   				target={STATE_IN}
	                   	/>
	                   
               </state>
               
               <state 	name={STATE_IN}
               			changed={CHANGED_IN}>
               			<transition action={ACTION_DISPLAY} 
	                   				target={STATE_DISPLAY}
	                   	/>	                   
               </state>
               <state 	name={STATE_OUT}
               			changed={CHANGED_OUT}>
               			<transition action={ACTION_DISPLAY} 
	                   				target={STATE_DISPLAY}
	                   	/>	                   
               </state>
             
              
        	</fsm>;
		
		
	}
}